<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>更改src值</title>
		<style type="text/css">
			img{
				width: 400px;
				height: 400px;
			}
		</style>
		<script type="text/javascript">
			function change_pic(){
				document.getElementById('change').src="img/TB2.jpg";
			}
		</script>
	</head>
	<body>
		<input type="button" value="点击" onclick="change_pic()"/>
		<img id="change" src="img/TB1.jpg"/>
	</body>
</html>
